package com.yanqu.road.server.game.service;

import com.google.protobuf.InvalidProtocolBufferException;
import com.yanqu.road.pb.activity.GoddessProto;
import com.yanqu.road.pb.syncMessage.SyncMessage;
import com.yanqu.road.server.manger.activity.goddess.GoddessMgr;
import com.yanqu.road.sync.message.SyncResponse;

public class GoddessWatchUserServiceCmd implements IGameServiceCommand {

    @Override
    public SyncResponse execute(SyncMessage.Request request) throws InvalidProtocolBufferException {
        SyncResponse syncResponse = new SyncResponse();
        GoddessProto.GoddessOtherUserSimpleDataReqMsg reqMsg = GoddessProto.GoddessOtherUserSimpleDataReqMsg.parseFrom(request.getDataBytes());
        GoddessProto.GoddessOtherUserSimpleDataRespMsg.Builder builder = GoddessMgr.watch(reqMsg.getActivityId(), reqMsg.getUserId());
        syncResponse.setResponseBuilder(builder);
        return syncResponse;
    }
}
